import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../layout/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    redirect: '/goods',
    component: Home,
    children: [
      {
        path: '/goods',
        component: () =>
          import(/* webpackChunkName: "Goods" */ '../views/Goods')
      },
      {
        path: '/rates',
        component: () =>
          import(/* webpackChunkName: "Rates" */ '../views/Rates')
      },
      {
        path: '/seller',
        component: () =>
          import(/* webpackChunkName: "Seller" */ '../views/Seller')
      }
    ]
  }
]

// component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')

const router = new VueRouter({
  routes
})

export default router
